package controller;

import baseDate.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;

/**
 * @version 1.0
 * @Author: 举个栗子吖
 * @Date: 2019/11/12 9:34
 */
@Controller
@RequestMapping("/data")
public class DateController extends BaseController {
    //    使用配置时间转换
    @RequestMapping(value = "/test1")
    @ResponseBody
    public String test1(Date birthday) {
        return "birthday" + birthday;
    }

    //  使用xml方式实现时间转换
    @RequestMapping(value = "/text2")
    @ResponseBody
    public String test2(Date birthday) {
        return "birthday" + birthday;
    }
}
